import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/index'
  },
  {
    path: '/index',
    name:'积分',
    component: () => import('../views/index.vue')
  },
  {
    path: '/insufficient',
    name:'积分不足',
    component: () => import('../views/insufficient.vue')
  },
  {
    path: '/exchange',
    name:'兑换',
    component: () => import('../views/exchange.vue')
  },
  {
    path: '/success',
    name:'积分',
    component: () => import('../views/success.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})


export default router
